<script setup lang="ts">
const emits = defineEmits(['scrollToptap'])
//
// 获取屏幕边界到安全区域的距离
const { safeAreaInsets } = uni.getSystemInfoSync()
</script>

<template>
  <view
    class="navbar"
    @tap="emits('scrollToptap')"
    :style="{ paddingTop: safeAreaInsets?.top + 'px' }"
  >
    <!-- logo文字 -->
    <view class="logo">
      <text class="logo-text">我的</text>
    </view>
  </view>
</template>

<style lang="scss">
/* 自定义导航条 */
.navbar {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 10vh;

  .logo {
    .logo-text {
      text-align: center;
      line-height: 28rpx;
      color: #000000;
      margin: 2rpx 0 0 20rpx;

      font-size: 26rpx;
    }
  }
}
</style>
